#!/bin/bash

echo 进程开始，正在绕过手机，本脚本仅适用于13.3以上的有重认证激活的手机！

rm -rf ~/.ssh/known_hosts

cd ~/Desktop/SSHPASS

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 mount -o rw,union,update /

./sshpass -p alpine scp -rP 1025 -o StrictHostKeyChecking=no ./bypass1 root@localhost:/usr/libexec/bypass1

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 mv /usr/libexec/mobileactivationd /usr/libexec/mobileactivationdbak

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 mv /usr/libexec/bypass1 /usr/libexec/mobileactivationd

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 chmod 755 /usr/libexec/mobileactivationd

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 launchctl unload /System/Library/LaunchDaemons/com.apple.mobileactivationd.plist

echo 激活文件修改文件成功！请等待部署过程完成！

./sshpass -p "alpine" ssh -o StrictHostKeyChecking=no root@localhost -p 1025 launchctl load /System/Library/LaunchDaemons/com.apple.mobileactivationd.plist

echo 绕过完毕，请设置手机的设置向导，然后重连电脑即可安装爱思助手，enjoy！
